home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / lang / FPL_v147.lha / fpl / src / Makefile.SVR4 < prev    next >
Makefile  |  1996-08-21  |  4KB  |  102 lines

  1. # makefile v1.1 August 21 1996
  2.  
  3. # This makefile should compile FPL under most UNIXes that has gcc _and_
  4. # support shared (dynamically linked) libraries.
  5.  
  6. ########################################################################
  7. #                                                                      #
  8. # fpl.library - A shared library interpreting script langauge.         #
  9. # Copyright (C) 1992-1996 FrexxWare                                    #
  10. # Author: Daniel Stenberg                                              #
  11. #                                                                      #
  12. # This program is free software; you may redistribute for non          #
  13. # commercial purposes only. Commercial programs must have a written    #
  14. # permission from the author to use FPL. FPL is *NOT* public domain!   #
  15. # Any provided source code is only for reference and for assurance     #
  16. # that users should be able to compile FPL on any operating system     #
  17. # he/she wants to use it in!                                           #
  18. #                                                                      #
  19. # You may not change, resource, patch files or in any way reverse      #
  20. # engineer anything in the FPL package.                                #
  21. #                                                                      #
  22. # This program is distributed in the hope that it will be useful,      #
  23. # but WITHOUT ANY WARRANTY; without even the implied warranty of       #
  24. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                 #
  25. #                                                                      #
  26. # Daniel Stenberg                                                      #
  27. # Ankdammsgatan 36, 4tr                                                #
  28. # S-171 43 Solna                                                       #
  29. # Sweden                                                               #
  30. #                                                                      #
  31. # FidoNet 2:201/328    email:dast@sth.frontec.se                       #
  32. #                                                                      #
  33. ########################################################################
  34.  
  35. .SUFFIXES: .o .c .c~ .h .h~ .a .i
  36.  
  37. ################################################
  38. # Below follows all UNIX macros/actions/lines: #
  39. ################################################
  40. LIB     = libfpl.a
  41. TARGET  = FPL
  42. OBJS    = script.o numexpr.o caller.o hash.o statement.o memory.o frontend.o \
  43.           reference.o sprintf.o scan.o compile.o sscanf.o
  44. LIBOBJS = script.o numexpr.o hash.o statement.o memory.o frontend.o \
  45.           reference.o sprintf.o scan.o compile.o sscanf.o
  46. LIBDEP  = $(LIBOBJS)
  47.  
  48. # if using the `gcc' compiler:
  49. CFLAGS  = -DUNIX -DSHARED -ansi -pedantic -g -funsigned-char
  50. CC      = gcc
  51. LD      = ld
  52.  
  53.  
  54. # -G makes the destination to become a sharable object!
  55. #    -B symbolic  In dynamic mode only, when  building  a  shared
  56. #                 object,  bind  references  to  global symbols to
  57. #                 their definitions within the object, if  defini-
  58. #                 tions  are  available.   Normally, references to
  59. #                 global symbols within  shared  objects  are  not
  60. #                 bound  until  runtime,  even  if definitions are
  61. #                 available, so that definitions of the same  sym-
  62. #                 bol in an executable or other shared objects can
  63. #                 override the object's own definition.
  64. # (The Send() function collided with the one with the same name used in
  65. # Dancer.)
  66. #
  67. LDFLAGS = -G -B symbolic
  68.  
  69. all:    $(LIB) SFPL
  70.  
  71. $(LIB) : $(LIBDEP)
  72.     $(LD) $(LDFLAGS) $(LIBOBJS) -o $(LIB) -lc
  73.     cp -p FPL.h ../include/libraries
  74.  
  75. $(TARGET) : $(OBJS)
  76.     $(CC) $(OBJS) -o $(TARGET)
  77.  
  78. .c.o:
  79.     $(CC) $(CFLAGS) -c $<
  80.  
  81. clean:
  82.     rm *.o
  83.     rm $(LIB) SFPL
  84.  
  85. # This compiling is using -DSFPL to make the MALLOC() macro not to use the
  86. # global `mem' variable!
  87. SFPL: caller.c FPL.h script.h Makefile.SVR4
  88.     $(CC) $(CFLAGS) -DSFPL -o SFPL caller.c -L. -lfpl
  89.  
  90. $(OBJS): script.h FPL.h
  91.  
  92. script.o:script.c
  93. numexpr.o:numexpr.c
  94. caller.o:caller.c
  95. statement.o:statement.c
  96. hash.o:hash.c
  97. memory.o:memory.c memory.h
  98. frontend.o:frontend.c
  99. reference.o:reference.c
  100. sprintf.o:sprintf.c
  101. scan.o:scan.c
  102.